package com.wemew.securityserver.controller;

import org.springframework.security.access.annotation.Secured;
import org.springframework.security.access.prepost.PostAuthorize;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class HelloController {
//    @PreAuthorize("hasRole('ROLE_user')")
    @PreAuthorize("hasAnyAuthority('user')")
//    @Secured({"ROLE_user","ROLE_manager"})
    @RequestMapping("hello")
    public String hello(){
        return "hello";
    }
}
